var p=1;
var url = "sky.php";
$(function() {	
	find(1,4,1);	
});
function find(page,rows,flag){	
	p = page;
	if(flag==2){		
		p=p+1;
		page=p;
	}
	if(flag==3){		
		p=p-1;
		if(p<=0)
			p=1;
		page=p;
	}		
	$.post(url,{doAction:"act_info",page:page,rows:rows},function(data){
		$('#name').html(data.name);
		$('#pno').html(data.pno);
		$('#clanguage').html(data.clanguage);
		$('#tgjjze').html(data.tgjjze);
		$('#jscore').html(data.jscore);
		$('#zgqall').html(data.all);
		$('#zgqspare').html(data.all_rest);		
		$('#zgqall1').html(data.a);
		$('#zgqspare1').html(data.a1);
		$('#zgqall2').html(data.a2);
		$('#zgqspare2').html(data.a3);		
		$('#tc').html(data.tc);
		$('#dc').html(data.dc);
		$('#dc1').html(data.dc1);
		$('#slevel').html(data.slevel);
		$('#reward_point').html(data.reward_point);
		$('#circulation_point').html(data.circulation_point);
		$('#register_point').html(data.register_point);
		$('#electron_point').html(data.electron_point);
		$('#keeping_point').html(data.keeping_point);
		$('#sky_point').html(data.sky_point);
		$('#mall_point').html(data.mall_point);
		$('#dividend_point').html(data.dividend_point);
        $('#sbd').attr("style",data.pg);    
	    $('#fb').attr("style",data.pg1);
	    $("#imgList tr:not(#title)").remove();
		 $.each(data.f,function(index,item){  			   
             $("#imgList").append(  
                       "<tr> <td width='30%'>>>>  <a href='#' onclick='showMsg(\""+item.id+"\")'> "+item.title+"</a></td>"                     
                     + "<td  width='30%'>" +  item.add_date  + "</td>"                          
                     + "</tr>");  
           });  
	
	},"json");
}
function showMsg(id){	
	$.post(url,{doAction:"act_getPlacard",id:id},function(data){	
		alert(data.content);		
	},"json");
	
}
